<template>
  <div id="JobChance" class="job-opportunities">
    <!-- 页面头部 -->
    <div class="job-hero">
      <div class="hero-content">
        <div class="hero-badge">
          <span class="badge-text">加入我们</span>
        </div>
        <h1 class="hero-title">工作机会</h1>
        <p class="hero-subtitle">与我们一起创造未来，在这里发挥您的才能</p>
        <div class="hero-stats">
          <div class="stat-item">
            <span class="stat-number">50+</span>
            <span class="stat-label">团队成员</span>
          </div>
          <div class="stat-item">
            <span class="stat-number">5+</span>
            <span class="stat-label">开放岗位</span>
          </div>
          <div class="stat-item">
            <span class="stat-number">100%</span>
            <span class="stat-label">员工满意度</span>
          </div>
        </div>
      </div>
    </div>

    <!-- 公司文化 -->
    <div class="company-culture">
      <div class="culture-container">
        <div class="section-header wow fadeInUp">
          <h2>为什么选择我们</h2>
          <p>优秀的团队文化，广阔的发展空间，让每个人都能发光发热</p>
        </div>
        
        <div class="culture-grid">
          <div class="culture-item wow fadeInUp" data-wow-delay="0.1s">
            <div class="culture-icon">
              <i class="glyphicon glyphicon-flash"></i>
            </div>
            <h3>技术驱动</h3>
            <p>前沿技术栈，持续学习，与技术发展同步</p>
          </div>
          
          <div class="culture-item wow fadeInUp" data-wow-delay="0.2s">
            <div class="culture-icon">
              <i class="glyphicon glyphicon-heart"></i>
            </div>
            <h3>人文关怀</h3>
            <p>弹性工作制，完善福利，注重工作生活平衡</p>
          </div>
          
          <div class="culture-item wow fadeInUp" data-wow-delay="0.3s">
            <div class="culture-icon">
              <i class="glyphicon glyphicon-star"></i>
            </div>
            <h3>成长机会</h3>
            <p>明确晋升路径，导师制培养，助力个人发展</p>
          </div>
          
          <div class="culture-item wow fadeInUp" data-wow-delay="0.4s">
            <div class="culture-icon">
              <i class="glyphicon glyphicon-globe"></i>
            </div>
            <h3>开放包容</h3>
            <p>多元化团队，开放沟通，鼓励创新思维</p>
          </div>

          <div class="culture-item wow fadeInUp" data-wow-delay="0.5s">
            <div class="culture-icon">
              <i class="glyphicon glyphicon-cog"></i>
            </div>
            <h3>技术创新</h3>
            <p>鼓励技术创新和实验，投入研发资源支持前沿技术探索</p>
          </div>

          <div class="culture-item wow fadeInUp" data-wow-delay="0.6s">
            <div class="culture-icon">
              <i class="glyphicon glyphicon-thumbs-up"></i>
            </div>
            <h3>员工福利</h3>
            <p>丰厚薪酬待遇，完善的社保体系，多样化团建活动</p>
          </div>
        </div>
      </div>
    </div>

    <!-- 职位列表 -->
    <div class="job-positions">
      <div class="positions-container">
        <div class="section-header wow fadeInUp">
          <h2>开放职位</h2>
          <p>寻找志同道合的伙伴，一起创造技术的无限可能</p>
        </div>
        
        <div class="positions-grid">
          <div 
            class="position-card wow fadeInUp" 
            v-for="(job, index) in jobList" 
            :key="index"
            :data-wow-delay="`${index * 0.1}s`"
            @click="showJobDetail(job)"
          >
            <div class="position-header">
              <div class="position-info">
                <h3>{{ job.title }}</h3>
                <div class="position-meta">
                  <span class="position-type">{{ job.type }}</span>
                  <span class="position-location">{{ job.location }}</span>
                  <span class="position-salary">{{ job.salary }}</span>
                </div>
              </div>
              <div class="position-badge">
                <span :class="job.urgent ? 'badge-urgent' : 'badge-normal'">
                  {{ job.urgent ? '急招' : '招聘中' }}
                </span>
              </div>
            </div>
            
            <div class="position-summary">
              <p>{{ job.summary }}</p>
            </div>
            
            <div class="position-tags">
              <span 
                v-for="skill in job.skills" 
                :key="skill" 
                class="skill-tag"
              >{{ skill }}</span>
            </div>
            
            <div class="position-footer">
              <span class="position-experience">{{ job.experience }}</span>
              <div class="position-actions">
                <button class="btn-apply" @click.stop="submitForm(job)">
                  立即申请
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 职位详情弹窗 -->
    <div v-if="selectedJob" class="job-modal" @click="closeJobDetail">
      <div class="modal-content" @click.stop>
        <div class="modal-header">
          <h2>{{ selectedJob.title }}</h2>
          <button class="close-btn" @click="closeJobDetail">×</button>
        </div>
        
        <div class="modal-body">
          <div class="job-meta">
            <div class="meta-item">
              <span class="meta-label">工作类型：</span>
              <span class="meta-value">{{ selectedJob.type }}</span>
            </div>
            <div class="meta-item">
              <span class="meta-label">工作地点：</span>
              <span class="meta-value">{{ selectedJob.location }}</span>
            </div>
            <div class="meta-item">
              <span class="meta-label">薪资范围：</span>
              <span class="meta-value">{{ selectedJob.salary }}</span>
            </div>
            <div class="meta-item">
              <span class="meta-label">经验要求：</span>
              <span class="meta-value">{{ selectedJob.experience }}</span>
            </div>
          </div>
          
          <div class="job-section">
            <h3>岗位职责</h3>
            <ul>
              <li v-for="duty in selectedJob.duties" :key="duty">{{ duty }}</li>
            </ul>
          </div>
          
          <div class="job-section">
            <h3>任职要求</h3>
            <ul>
              <li v-for="requirement in selectedJob.requirements" :key="requirement">{{ requirement }}</li>
            </ul>
          </div>
          
          <div class="job-section" v-if="selectedJob.benefits">
            <h3>福利待遇</h3>
            <ul>
              <li v-for="benefit in selectedJob.benefits" :key="benefit">{{ benefit }}</li>
            </ul>
          </div>
        </div>
        
        <div class="modal-footer">
          <button class="btn-apply-modal" @click="submitForm(selectedJob)">
            立即申请
          </button>
        </div>
      </div>
    </div>
    
    <!-- 优雅的申请弹窗 -->
    <div v-if="showApplyModal" class="apply-modal-overlay" @click="closeApplyModal">
      <div class="apply-modal" @click.stop>
        <div class="apply-modal-header">
          <div class="modal-title-section">
            <h3>申请职位</h3>
            <div class="job-title-badge">{{ applyingJob?.title }}</div>
          </div>
          <button class="modal-close-btn" @click="closeApplyModal">
            <i class="glyphicon glyphicon-remove"></i>
          </button>
        </div>
        
        <div class="apply-modal-body" v-if="!applicationSuccess">
          <form @submit.prevent="submitApplication" class="application-form">
            <div class="form-section">
              <h4>基本信息</h4>
              <div class="form-row">
                <div class="form-group">
                  <label for="applicantName">姓名 *</label>
                  <input 
                    type="text" 
                    id="applicantName"
                    v-model="applicationForm.name"
                    placeholder="请输入您的姓名"
                    required
                  />
                </div>
                <div class="form-group">
                  <label for="applicantEmail">邮箱 *</label>
                  <input 
                    type="email" 
                    id="applicantEmail"
                    v-model="applicationForm.email"
                    placeholder="请输入您的邮箱"
                    required
                  />
                </div>
              </div>
              
              <div class="form-row">
                <div class="form-group">
                  <label for="applicantPhone">电话 *</label>
                  <input 
                    type="tel" 
                    id="applicantPhone"
                    v-model="applicationForm.phone"
                    placeholder="请输入您的电话"
                    required
                  />
                </div>
                <div class="form-group">
                  <label for="applicantExperience">工作经验</label>
                  <select id="applicantExperience" v-model="applicationForm.experience">
                    <option value="">请选择工作经验</option>
                    <option value="0-1年">0-1年</option>
                    <option value="1-3年">1-3年</option>
                    <option value="3-5年">3-5年</option>
                    <option value="5年以上">5年以上</option>
                    <option value="应届毕业生">应届毕业生</option>
                    <option value="在校学生">在校学生</option>
                  </select>
                </div>
              </div>
            </div>
            
            <div class="form-section">
              <h4>个人介绍</h4>
              <div class="form-group">
                <label for="applicantMessage">请简单介绍一下自己</label>
                <textarea 
                  id="applicantMessage"
                  v-model="applicationForm.message"
                  rows="4"
                  placeholder="请简单介绍您的技能、经验和对这个岗位的理解..."
                ></textarea>
              </div>
            </div>
            
            <div class="form-actions">
              <button type="button" class="btn-cancel" @click="closeApplyModal">
                取消
              </button>
              <button type="submit" class="btn-submit-application" :disabled="isSubmittingApplication">
                <span v-if="isSubmittingApplication">
                  <i class="glyphicon glyphicon-refresh spinning"></i>
                  提交中...
                </span>
                <span v-else>
                  <i class="glyphicon glyphicon-send"></i>
                  提交申请
                </span>
              </button>
            </div>
          </form>
        </div>
        
        <div class="apply-success" v-else>
          <div class="success-animation">
            <div class="success-icon">
              <i class="glyphicon glyphicon-ok"></i>
            </div>
          </div>
          <h3>申请提交成功！</h3>
          <p>感谢您申请 <strong>{{ applyingJob?.title }}</strong> 职位</p>
          <div class="success-info">
            <p>我们已收到您的申请，将在3个工作日内回复。</p>
            <p>如有疑问，可联系我们：</p>
            <div class="contact-info">
              <div class="contact-item">
                <i class="glyphicon glyphicon-envelope"></i>
                <span>1437594522@qq.com</span>
              </div>
              <div class="contact-item">
                <i class="glyphicon glyphicon-earphone"></i>
                <span>15328965713</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup name="JobChance">
import WOW from 'wow.js'
import { onMounted, ref, reactive } from 'vue'

const selectedJob = ref(null)

// 职位数据
const jobList = [
  {
    title: '前端开发工程师',
    type: '全职',
    location: '杭州',
    salary: '15K-30K',
    experience: '3-5年',
    urgent: true,
    summary: '负责公司核心产品的前端开发，参与产品架构设计，提升用户体验',
    skills: ['Vue.js', 'React', 'TypeScript', 'Node.js'],
    duties: [
      '负责公司产品Web端和移动端前端开发工作',
      '与UI设计师、后端工程师紧密配合，确保产品高质量交付',
      '参与产品需求分析和技术方案制定',
      '优化前端性能，提升用户体验',
      '制定和维护前端开发规范，参与代码评审'
    ],
    requirements: [
      '3年以上前端开发经验，熟练掌握HTML5、CSS3、JavaScript',
      '熟练使用Vue.js或React框架，了解其原理和生态',
      '熟悉TypeScript，具备良好的代码规范和编程习惯',
      '了解前端工程化工具和流程（Webpack、Vite等）',
      '有移动端开发经验者优先',
      '具备良好的沟通能力和团队协作精神'
    ],
    benefits: [
      '五险一金 + 补充商业保险',
      '弹性工作时间，可选择居家办公',
      '年度体检，定期团建活动',
      '技术培训津贴，参加行业会议',
      '股权激励计划'
    ]
  },
  {
    title: '后端开发工程师',
    type: '全职',
    location: '杭州',
    salary: '20K-35K',
    experience: '3-8年',
    urgent: false,
    summary: '负责高并发分布式系统的设计和开发，保障系统稳定性和扩展性',
    skills: ['Java', 'Spring Boot', 'MySQL', 'Redis', 'Docker'],
    duties: [
      '负责后端服务架构设计和核心模块开发',
      '设计和优化数据库结构，提升系统性能',
      '参与分布式系统设计，解决高并发问题',
      '制定API接口规范，与前端团队协调联调',
      '参与系统运维，保障线上服务稳定运行'
    ],
    requirements: [
      '3年以上Java开发经验，熟悉Spring Boot框架',
      '熟悉MySQL数据库设计和优化，了解Redis等缓存技术',
      '有分布式系统开发经验，了解微服务架构',
      '熟悉Docker容器化技术，了解Kubernetes者优先',
      '具备良好的系统设计能力和解决问题的能力',
      '有大型互联网项目经验者优先'
    ],
    benefits: [
      '五险一金 + 补充商业保险',
      '弹性工作时间，技术氛围浓厚',
      '内部技术分享，外部培训机会',
      '年终奖 + 项目奖金',
      '股权激励，与公司共同成长'
    ]
  },
  {
    title: 'DevOps工程师',
    type: '全职',
    location: '杭州',
    salary: '18K-32K',
    experience: '2-6年',
    urgent: false,
    summary: '负责CI/CD流程建设，云基础设施管理，保障系统高可用性',
    skills: ['Kubernetes', 'Docker', 'Jenkins', 'AWS', 'Terraform'],
    duties: [
      '设计和维护CI/CD流水线，提升发布效率',
      '管理云基础设施，保障系统高可用性',
      '监控系统性能，及时发现和解决问题',
      '自动化运维工具开发，提升运维效率',
      '协助开发团队进行系统部署和问题排查'
    ],
    requirements: [
      '2年以上DevOps或运维开发经验',
      '熟悉Kubernetes、Docker容器技术',
      '熟悉Jenkins、GitLab CI等CI/CD工具',
      '了解AWS、阿里云等云平台服务',
      '熟悉Linux系统管理和Shell脚本编写',
      '具备自动化思维和解决问题的能力'
    ]
  },
  {
    title: '产品经理',
    type: '全职',
    location: '杭州',
    salary: '18K-30K',
    experience: '3-7年',
    urgent: true,
    summary: '负责产品规划和需求分析，推动产品创新和用户体验优化',
    skills: ['产品设计', '需求分析', 'Axure', 'Figma', '数据分析'],
    duties: [
      '负责产品需求调研和分析，制定产品发展规划',
      '设计产品功能和用户体验，输出详细的产品文档',
      '与技术团队协作，推进产品开发进度',
      '分析产品数据，持续优化产品功能',
      '参与市场调研，了解行业趋势和竞品动态'
    ],
    requirements: [
      '3年以上互联网产品经验，有B端或C端产品经验',
      '具备优秀的需求分析和产品设计能力',
      '熟练使用Axure、Figma等产品设计工具',
      '具备数据分析能力，能够基于数据驱动产品决策',
      '优秀的沟通协调能力和项目管理能力',
      '对用户体验有深刻理解，关注细节'
    ]
  },
  {
    title: 'UI/UX设计师',
    type: '全职',
    location: '杭州',
    salary: '12K-25K',
    experience: '2-5年',
    urgent: false,
    summary: '负责产品界面设计和用户体验优化，打造优秀的视觉体验',
    skills: ['Figma', 'Sketch', 'Adobe Creative Suite', 'Principle'],
    duties: [
      '负责公司产品的UI设计和交互设计',
      '制定和维护设计规范，保证设计一致性',
      '与产品经理和开发团队密切配合，确保设计落地',
      '持续优化用户体验，提升产品易用性',
      '参与用户调研，了解用户需求和使用习惯'
    ],
    requirements: [
      '2年以上UI/UX设计经验，有移动端和Web端设计经验',
      '熟练使用Figma、Sketch等设计工具',
      '具备良好的视觉设计能力和审美素养',
      '了解交互设计原理，关注用户体验',
      '有设计系统建设经验者优先',
      '良好的沟通能力和团队协作精神'
    ]
  },
  {
    title: '前端开发实习生',
    type: '实习',
    location: '杭州',
    salary: '3K-5K',
    experience: '在读学生',
    urgent: false,
    summary: '参与前端项目开发，学习业界最佳实践，提升技术能力',
    skills: ['HTML', 'CSS', 'JavaScript', 'Vue.js'],
    duties: [
      '协助完成前端页面开发和维护',
      '参与产品功能测试和优化',
      '学习和掌握前端最新技术栈',
      '协助团队完成项目任务',
      '参与技术分享和学习'
    ],
    requirements: [
      '计算机相关专业在读本科或研究生',
      '熟悉HTML、CSS、JavaScript基础知识',
      '了解Vue.js或React等前端框架',
      '对前端开发有浓厚兴趣',
      '具备良好的学习能力和沟通能力',
      '每周能保证3天以上实习时间'
    ],
    benefits: [
      '实习补贴 + 交通补助',
      '专业技术指导和培训',
      '参与真实项目开发',
      '实习证明和推荐信',
      '表现优秀者可获得正式工作机会'
    ]
  },
  {
    title: '后端开发实习生',
    type: '实习',
    location: '杭州',
    salary: '3K-5K',
    experience: '在读学生',
    urgent: false,
    summary: '参与后端系统开发，学习分布式系统设计和开发',
    skills: ['Java', 'Spring Boot', 'MySQL', 'Redis'],
    duties: [
      '协助后端接口开发和测试',
      '参与数据库设计和优化',
      '学习分布式系统相关技术',
      '协助完成系统性能优化',
      '参与代码审查和技术分享'
    ],
    requirements: [
      '计算机相关专业在读本科或研究生',
      '熟悉Java编程语言和基础框架',
      '了解Spring Boot、MyBatis等开发框架',
      '了解数据库基础知识',
      '对后端开发有浓厚兴趣',
      '每周能保证3天以上实习时间'
    ],
    benefits: [
      '实习补贴 + 交通补助',
      '经验丰富的技术导师指导',
      '与正式员工同等的项目参与机会',
      '实习证明和职业发展指导',
      '表现优秀者优先录用'
    ]
  },
  {
    title: '产品运营实习生',
    type: '实习',
    location: '杭州',
    salary: '2K-4K',
    experience: '在读学生',
    urgent: true,
    summary: '参与产品运营工作，学习数据分析和用户增长策略',
    skills: ['数据分析', '用户研究', 'Excel', 'SQL'],
    duties: [
      '协助进行产品数据分析和用户行为研究',
      '参与用户增长活动的策划和执行',
      '学习使用数据分析工具和方法',
      '协助制作运营报告和总结',
      '参与竞品分析和市场调研'
    ],
    requirements: [
      '市场营销、经济管理等相关专业在读学生',
      '具备良好的数据敏感性和逻辑思维',
      '熟练使用Excel，了解SQL者优先',
      '对互联网产品和运营有浓厚兴趣',
      '具备良好的沟通能力和团队协作精神',
      '每周能保证4天以上实习时间'
    ],
    benefits: [
      '实习补贴 + 绩效奖金',
      '互联网产品运营全流程体验',
      '与业务团队的深度协作机会',
      '个人能力提升和职业发展指导',
      '优秀实习生有转正机会'
    ]
  }
]

function showJobDetail(job) {
  selectedJob.value = job
  document.body.style.overflow = 'hidden'
}

function closeJobDetail() {
  selectedJob.value = null
  document.body.style.overflow = ''
}

// 申请状态
const showApplyModal = ref(false)
const applyingJob = ref(null)
const isSubmittingApplication = ref(false)
const applicationSuccess = ref(false)

// 申请表单数据
const applicationForm = reactive({
  name: '',
  email: '',
  phone: '',
  experience: '',
  message: ''
})

function submitForm(job) {
  applyingJob.value = job
  showApplyModal.value = true
  applicationSuccess.value = false
  // 重置表单
  Object.keys(applicationForm).forEach(key => {
    applicationForm[key] = ''
  })
  document.body.style.overflow = 'hidden'
}

function closeApplyModal() {
  showApplyModal.value = false
  applyingJob.value = null
  document.body.style.overflow = ''
}

async function submitApplication() {
  if (!applicationForm.name || !applicationForm.email || !applicationForm.phone) {
    alert('请填写必要信息')
    return
  }
  
  isSubmittingApplication.value = true
  
  try {
    // 模拟提交过程
    await new Promise(resolve => setTimeout(resolve, 2000))
    
    applicationSuccess.value = true
    
    // 3秒后自动关闭
    setTimeout(() => {
      closeApplyModal()
    }, 3000)
  } catch (error) {
    alert('提交失败，请稍后重试')
  } finally {
    isSubmittingApplication.value = false
  }
}

onMounted(() => {
  const wow = new WOW({
    boxClass: 'wow',
    animateClass: 'animated',
    offset: 0,
    mobile: true,
    live: true
  })
  wow.init()
})
</script>

<style scoped>
/* 苹果风格工作机会页面 */
.job-opportunities {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff;
  color: #1d1d1f;
}

/* 页面头部 */
.job-hero {
  padding: 120px 0;
  background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-badge {
  margin-bottom: 24px;
}

.badge-text {
  display: inline-block;
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hero-subtitle {
  font-size: 21px;
  font-weight: 400;
  color: #86868b;
  margin: 0 0 48px 0;
  line-height: 1.38;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 15px;
  font-weight: 400;
  color: #86868b;
}

/* 公司文化 */
.company-culture {
  padding: 140px 0;
  background: #f5f5f7;
}

.culture-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.section-header p {
  font-size: 19px;
  font-weight: 400;
  color: #86868b;
  margin: 0;
  line-height: 1.42;
}

.culture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.culture-item {
  background: #ffffff;
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.culture-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.02) 0%, rgba(0, 113, 227, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.culture-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 113, 227, 0.1);
}

.culture-item:hover::before {
  opacity: 1;
}

.culture-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, #0071e3 0%, #005bb5 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.culture-icon i {
  font-size: 28px;
  color: #ffffff;
}

.culture-item h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.culture-item p {
  font-size: 17px;
  font-weight: 400;
  color: #515154;
  line-height: 1.47;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* 职位列表 */
.job-positions {
  padding: 140px 0;
  background: #ffffff;
}

.positions-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 32px;
  margin-top: 80px;
}

.position-card {
  background: #f5f5f7;
  border-radius: 18px;
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  position: relative;
}

.position-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.02) 0%, rgba(0, 113, 227, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.position-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  background: #ffffff;
  border-color: rgba(0, 113, 227, 0.1);
}

.position-card:hover::before {
  opacity: 1;
}

.position-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.position-info h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.position-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.position-type,
.position-location,
.position-salary {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 500;
  background: rgba(0, 113, 227, 0.08);
  color: #0071e3;
}

.position-badge {
  flex-shrink: 0;
}

.badge-urgent {
  background: rgba(255, 59, 48, 0.08);
  color: #ff3b30;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-normal {
  background: rgba(52, 199, 89, 0.08);
  color: #34c759;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.position-summary {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.position-summary p {
  font-size: 16px;
  color: #515154;
  line-height: 1.5;
  margin: 0;
}

.position-tags {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.skill-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  margin: 0 8px 8px 0;
}

.position-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.position-experience {
  font-size: 14px;
  color: #86868b;
  font-weight: 500;
}

.btn-apply {
  background: #0071e3;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-apply:hover {
  background: #0077ed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

/* 职位详情弹窗 */
.job-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 32px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 32px;
}

.modal-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
  letter-spacing: -0.01em;
}

.close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #86868b;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

.modal-body {
  padding: 0 32px 32px;
}

.job-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px;
  background: #f5f5f7;
  border-radius: 12px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 13px;
  color: #86868b;
  font-weight: 500;
}

.meta-value {
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 600;
}

.job-section {
  margin-bottom: 32px;
}

.job-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

.job-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.job-section li {
  font-size: 16px;
  color: #515154;
  line-height: 1.6;
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.job-section li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #0071e3;
  font-weight: 600;
}

.modal-footer {
  padding: 0 32px 32px;
  display: flex;
  justify-content: center;
}

.btn-apply-modal {
  background: #0071e3;
  color: #ffffff;
  border: none;
  border-radius: 980px;
  padding: 16px 48px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.btn-apply-modal:hover {
  background: #0077ed;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .job-hero {
    padding: 80px 0;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 24px;
  }

  .company-culture,
  .job-positions {
    padding: 80px 0;
  }

  .culture-container,
  .positions-container {
    padding: 0 16px;
  }

  .culture-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .culture-item {
    padding: 32px 24px;
  }

  .positions-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 60px;
  }

  .position-card {
    padding: 24px;
  }

  .position-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .job-modal {
    align-items: flex-start;
    padding: 10px;
  }

  .modal-content {
    margin-top: 20px;
    max-height: 95vh;
  }

  .modal-header {
    padding: 24px 24px 0;
  }

  .modal-body {
    padding: 0 24px 24px;
  }

  .modal-footer {
    padding: 0 24px 24px;
  }

  .job-meta {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px;
  }
}

/* 申请弹窗样式 */
.apply-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.apply-modal {
  background: #ffffff;
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.apply-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 32px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-title-section h3 {
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.job-title-badge {
  background: linear-gradient(135deg, #0071e3, #005bb5);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
}

.modal-close-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #666;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
  transform: scale(1.05);
}

.apply-modal-body {
  padding: 0 32px 32px;
}

.application-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-section h4 {
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0, 113, 227, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 16px;
  font-weight: 500;
  color: #1d1d1f;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 16px 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
  transform: translateY(-2px);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-cancel {
  padding: 16px 32px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #666;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.btn-cancel:hover {
  border-color: rgba(0, 0, 0, 0.2);
  color: #1d1d1f;
  transform: translateY(-2px);
}

.btn-submit-application {
  padding: 16px 32px;
  border: none;
  background: linear-gradient(135deg, #0071e3, #005bb5);
  color: #ffffff;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit-application:hover:not(:disabled) {
  background: linear-gradient(135deg, #0077ed, #0066cc);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 113, 227, 0.4);
}

.btn-submit-application:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 成功状态样式 */
.apply-success {
  padding: 48px 32px;
  text-align: center;
}

.success-animation {
  margin-bottom: 32px;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: linear-gradient(135deg, #34c759, #30d158);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
  0% { 
    transform: scale(0);
    opacity: 0;
  }
  50% { 
    transform: scale(1.2);
    opacity: 1;
  }
  100% { 
    transform: scale(1);
    opacity: 1;
  }
}

.success-icon i {
  font-size: 36px;
  color: #ffffff;
}

.apply-success h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.apply-success > p {
  font-size: 18px;
  color: #86868b;
  margin: 0 0 32px 0;
}

.success-info {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 24px;
  text-align: left;
}

.success-info p {
  font-size: 16px;
  color: #515154;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.success-info p:last-of-type {
  margin-bottom: 20px;
  font-weight: 500;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.contact-item i {
  font-size: 16px;
  color: #0071e3;
  width: 20px;
  text-align: center;
}

.contact-item span {
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 500;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .apply-modal {
    margin: 10px;
    max-height: 95vh;
  }
  
  .apply-modal-header {
    padding: 24px 20px 20px;
  }
  
  .modal-title-section h3 {
    font-size: 24px;
  }
  
  .apply-modal-body {
    padding: 0 20px 24px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-cancel,
  .btn-submit-application {
    width: 100%;
  }
  
  .apply-success {
    padding: 32px 20px;
  }
  
  .contact-info {
    gap: 8px;
  }
}
</style>